#include "CMob.h"

CMob::CMob(): CCharacter()
{
	m_ID				= 0;
	ZeroMemory( &m_MovementRange , sizeof(RANGE) );
	ZeroMemory( &m_SeekRange , sizeof(RANGE) );
}

CMob::CMob(ULONG ID, float Xpos, float Ypos, float deep, float XVelocity, float YVelocity, int width, int height): CCharacter( Xpos , Ypos , deep , XVelocity , YVelocity , width , height )
{
	m_ID			= ID;
	ZeroMemory( &m_MovementRange , sizeof(RANGE) );
	ZeroMemory( &m_SeekRange , sizeof(RANGE) );
}


CMob::~CMob()
{

}


//------------------------------------------//
// Name : SetID								//
// Desc : Set an unique ID for this mob		//
//------------------------------------------//
void CMob::SetID(ULONG id)
{
	m_ID = id;
}




//--------------------------------------------------//
// Name : SetMovementRange							//
// Desc : Setting the movement range for this mob	//
//--------------------------------------------------//
void CMob::SetMovementRange(float min, float max)
{
	m_MovementRange.fMinRange	= GetXposition() - min;
	m_MovementRange.fMaxRange	= GetYposition() + max;
}



//--------------------------------------------------//
// Name : SetSeekRange								//
// Desc : Setting the seeking range for this mob	//
//--------------------------------------------------//
void CMob::SetSeekRange(float min, float max)
{
	m_SeekRange.fMinRange	= min;
	m_SeekRange.fMaxRange	= max;
}




//----------------------------------//
// Name : GetID						//
// Desc : Get the ID of this mob	//
//----------------------------------//
ULONG CMob::GetID()
{
	return m_ID;
}

//----------------------------------------------//
// Name : GetSeekRange							//
// Desc : Get the seeking range of this mob		//
//----------------------------------------------//
void CMob::GetSeekRange(RANGE *pOut)
{
	pOut->fMinRange = this->GetXposition() - m_SeekRange.fMinRange;
	pOut->fMaxRange	= this->GetXposition() + m_SeekRange.fMaxRange;
}



//--------------------------------------------------//
// Name : GetMovementRange							//
// Desc : Get the movement range of this mob		//
//--------------------------------------------------//
void CMob::GetMovementRange(RANGE *pOut)
{
	pOut->fMinRange = m_MovementRange.fMinRange;
	pOut->fMaxRange	= m_MovementRange.fMaxRange;
}


